package day05;
import java.util.Arrays;
public class ArrayDemo {
    public static void main(String[] args) {

        int[]arr=new int[10];
        for(int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        Arrays.sort(arr);
        System.out.println("排序后为：");
for(int i=0;i<arr.length;i++){
    System.out.println(arr[i]);
}


        /*
        int []arr =new int[10];
        for(int i=0;i<arr.length;i++){
            arr[i]=100;
            System.out.println(arr[i]);

        }

 */

        /*
        int []arr=new int[3];
        System.out.println("数组的长度"+arr.length);
        System.out.println(arr[0]);
        arr[0]=100;
        arr[1]=200;
        arr[2]=300;
        System.out.println(arr[arr.length-1]);


 */
        /* int []a=new int [5];
        int [] b=new int[]{2,5,8};
        int [] c={2,5,8};
        int [] d;
        d=new int []{2,5,8};

        */
    }
}
